# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=scanssh
pkgver=2.1
pkgrel=10
groups=('blackarch' 'blackarch-scanner')
pkgdesc='Fast SSH server and open proxy scanner.'
arch=('x86_64' 'aarch64')
depends=('glibc' 'libdnet' 'libevent' 'openssl' 'libpcap' 'libmd' 'openssl-1.1')
url='http://www.monkey.org/~provos/scanssh/'
license=('GPL')
source=("http://www.monkey.org/~provos/$pkgname-$pkgver.tar.gz")
sha512sums=('1ddff6f8e51735bab28032c8d7cbb641ff0cd19a404a27ab489589ef1e30e3721dd486854eb4fef15368cc53f10c9c2650ffaf7fa7f767dc2202fcc5540ae59c')

build() {
  cd "$pkgname-$pkgver"

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --build=arm --prefix=/usr
  fi

  make
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share"

  make DESTDIR="$pkgdir" install

}

